﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using V5_EShop._Class.BLL;

namespace V5_EShop
{
    public partial class SaveComplaint : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var title = Request.Form["Title"] + string.Empty;
            var content = Request.Form["Content"] + string.Empty;
            var name = Request.Form["Name"] + string.Empty;

            if (title == "" || content == "" || name == "")
            {
                WriteMsg("请先输入必要的信息");
            }

            new BLLGZComplaintsRre().Add(new V5_Model.ModelGZComplaintsRre()
            {
                Content = content,
                CreateDate = DateTime.Now,
                Title = title,
                Complainant = name

            });

            WriteMsg("0"); 
        }

        private void WriteMsg(string info)
        {
            Response.Write(info);
            Response.End();
        }
    }
}